/**
 * 轮播图模块
 */
import request from 'utils/request.js'

/**
 * 查询轮播图
 * @returns 
 */
export const getAllSwiper = () => {
  return request({
    url:'/admin/getAllSwiper',
    method:'GET'
  })
}

/**
 * 添加轮播图
 * @param {*} data 
 * @returns 
 */
export const addSwiper = (data) => {
  return request({
    url:'/admin/addSwiper',
    method:'POST',
    data
  })
}

/**
 * 删除轮播图
 * @param {*} _id 
 * @returns 
 */
export const deleteSwiper = (_id) => {
  return request({
    url:'/admin/deleteSwiper/'+_id,
    method:"DELETE"
  })
}

/**
 * 修改轮播图
 * @param {*} data 
 * @returns 
 */
export const updateSwiper = (data) => {
  return request({
    url:'/admin/updateSwiper',
    method:'PUT',
    data
  })
}